


<style type="text/css">
 
    #report_table table tr{
    margin: 20px !important;
        
    }
</style>

  <fieldset>


    <h2>
    Add  Report
</h2>

        <form  id="report_form" name="report_form">
        <table border="0" cellpadding="10" cellspacing="0" width="100%" id="report_table">
            <tbody>
            <tr>
                <td>Title</td>
                <td>
                    <input type="text" class="required" required  name="data[Report][title]" id="data[Report][title]"
 value="<?php if(isset($report_data)) {echo $report_data['Report']['title'];} ?>" 
 />
                </td>
                <td></td>
            </tr>
         <tr></tr>
            <tr>
                <td>Query</td>
                <td>
                    <textarea required class="required" name="data[Report][params]" id="data[Report][params]" placeholder="Please Enter Query">
 <?php if(isset($report_data)) {echo $report_data['Report']['params'];} ?>
</textarea>
                </td>
                  <td></td>
            </tr>

             <tr>
<td>Category</td>
                <td>
     <select name="data[Report][category]" id="data[Report][category]" >
     <option value="ground" <?php if(isset($report_data) && $report_data['Report']['category']=="ground"){echo "selected";} ?>  >    Ground</option>
     <option value="permits" <?php if(isset($report_data) && $report_data['Report']['category']=="permits"){echo "selected";}?> >  Permits</option>
     <option value="fuel" <?php if(isset($report_data) && $report_data['Report']['category']=="fuel"){echo "selected";} ?> >   Fuel</option> 
 </td>
</select>
</tr>
            
              <tr></tr>


             <tr></tr>
            
              <tr></tr>
            <tr>
                <td></td>
                <td><input type="button" id="submit_report" name="submit_report" value="Save" /></td>
              <td><input type="button" id="cancel_submit_report" name="submit_report" value="Close" /></td> 
            </tr>
            </tbody>
        </table>
          <input type="hidden"  name="data[Report][action]" id="data[Report][action]" value="viewreport" />
          <input type="hidden"  name="data[Report][controller]" id="data[Report][controller]" value="reports" />
              
        <input type="hidden"  name="add_new_url" id="add_new_url" value="<?php echo $html->url(array("controller"=>"reports","action"=>"admin_add"))   ?>"/>
    
<?php  
if(isset($report_data)){
?>
 <input type="hidden" id="data[Report][id]"  name="data[Report][id]" value="<?php echo $report_data['Report']['id']; ?>" />
  
<?php     

}

 ?>



</form>
    </fieldset>
    

